<template>
  <div id="echarts" ref="echarts"></div>
</template>

<script>
import * as echarts from "echarts";
import { reportd } from "@/api/user";
export default {
  mounted() {
    this.createReport();
  },
  methods: {
    async createReport() {
      try {
        const data = await reportd();
        const echart = echarts.init(this.$refs.echarts);
        echart.setOption(data);
      } catch (error) {}
    },
  },
};
</script>

<style scoped >
#echarts {
  height: 500px;
}
</style>
